from gglib.utils import import_attr


class BaseCache:
    def set(self, key, value):
        raise NotImplementedError

    def get(self, key):
        raise NotImplementedError


from gglib.settings import CACHE

_cache_cls = import_attr(CACHE["BACKEND"])
cache = _cache_cls(**CACHE['OPTIONS'])